/*
 * @Author: lihaogn
 * @Date: 2021-07-25 15:43:58
 * @LastEditTime: 2021-08-15 11:42:56
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Lix-server\app\model\responseDto.js
 */

class ResponseDto {
  constructor(result, message, success, status) {
    this.success = success;
    this.result = result;
    this.message = message;
    this.status = status;
  }
}

class SuccessResponse extends ResponseDto {
  constructor(result, message, token, success = true, status = 200) {
    super(result, message, success, status);
    this.token = token;
  }
}

class ErrorResponse extends ResponseDto {
  constructor(result, message, success = false, status = 500) {
    super(result, message, success, status);
  }
}

module.exports = { SuccessResponse, ErrorResponse };
